<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
</head>
<body>
    <script type="text/javascript">
        var x=prompt("Enter a number between 0 and 10:","");
        try {
            if (x>10) {
                throw "Error1";
            }
            else if (x<0) {
                throw "Error2";
            }
            else if (isNaN(x)) {
                throw "Error3";
            }
            // if normal
            document.write(x);
        }
        catch (err) {
            if (err=="Error1") {
                alert("Too big");
            }
            else if (err=="Error2") {
                alert("Too small");
            }
            else if (err=="Error3") {
                alert("The value is not a number");
            }
        }
    </script>
	
</body>
</html>
